﻿<%@ Page Title="" MasterPageFile="~/BackOffice.master" Language="C#" AutoEventWireup="true" CodeBehind="CadastroUsuario.aspx.cs" Inherits="JA.Web.Apresentacao.CadastroUsuario" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>


<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
    <div class="art-Block">
        <div class="art-Block-body">
            <div class="art-BlockHeader">
                <div class="l"></div>
                <div class="r"></div>
                <div class="art-header-tag-icon">
                    <div class="t">Cadastro de Operadores</div>
                </div>
            </div>
            <div class="art-BlockContent">
                <div class="art-BlockContent-tl"></div>
                <div class="art-BlockContent-tr"></div>
                <div class="art-BlockContent-bl"></div>
                <div class="art-BlockContent-br"></div>
                <div class="art-BlockContent-tc"></div>
                <div class="art-BlockContent-bc"></div>
                <div class="art-BlockContent-cl"></div>
                <div class="art-BlockContent-cr"></div>
                <div class="art-BlockContent-cc"></div>
                <div class="art-BlockContent-body">

    <asp:UpdatePanel ID="upnUsuario" runat="server">
        <ContentTemplate>
            <asp:TabContainer ID="tabUsuario" runat="server" ActiveTabIndex="0">
                <asp:TabPanel ID="tabPesquisa" runat="server" HeaderText="Pesquisa">
                    <ContentTemplate>
                        <div style="width: 100%;">
                            <table style="width: 575px;">
                                <tr>
                                    <td>
                                        Código
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtId" runat="server"></asp:TextBox>
                                        <asp:MaskedEditExtender ID="mskTxtId" runat="server" Mask="9999999" TargetControlID="txtId" PromptCharacter="" />
                                    </td>
                                    <td>
                                        Nome
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtNome" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisa" OnClick="btnPesquisa_Click" />
                                        <br />
                                        <br />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                    <asp:GridView ID="grvResultado" runat="server" AutoGenerateColumns="False" EmptyDataText="Não foram encontrados registros nessa pesquisa!">
                                            <Columns>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbVisualizar_Click"
                                                            ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("IdUsuario") %>' />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="IdUsuario" HeaderText="ID"/>
                                                <asp:BoundField DataField="Nome" HeaderText="Nome" />
                                                <asp:BoundField DataField="Usuario" HeaderText="Usuário" />
                                                <asp:CheckBoxField DataField="Ativo" HeaderText="Ativo?" />
                                            </Columns>
                                        </asp:GridView>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabCadastro" runat="server" HeaderText="Cadastro">
                    <ContentTemplate>
                        <asp:Panel ID="panelCad" runat="server">
                            <div style="width: 575px;">
                                <table style="width: 100%;">
                                    <tr>
                                        <td>
                                            Código:
                                        </td>
                                        <td colspan="2">
                                            <asp:TextBox ID="txtCadId" runat="server" Enabled="False" BackColor="#E0E0E0"></asp:TextBox>
                                       </td>
                                    </tr>
                                    <tr>
                                       <td>
                                            Nome Completo:
                                        </td>
                                        <td colspan="2">
                                            <asp:TextBox ID="txtCadNome" runat="server" MaxLength="45"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvCadNome" runat="server" ControlToValidate="txtCadNome" 
                                            ErrorMessage="*" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                         </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Usuário:
                                        </td>
                                        <td colspan="2">
                                            <asp:TextBox ID="txtCadUser" runat="server" MaxLength="45"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvCadUser" runat="server" ControlToValidate="txtCadUser" 
                                            ErrorMessage="*" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                       </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Senha :
                                        </td>
                                        <td colspan="2">
                                            <asp:TextBox ID="txtCadPass" runat="server" MaxLength="45" TextMode="Password"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Confirmação Senha:
                                        </td>
                                        <td colspan="2">
                                            <asp:TextBox ID="txtCadPass2" runat="server" MaxLength="45" TextMode="Password"></asp:TextBox>
                                       </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Ativo:
                                        </td>
                                        <td colspan="2">
                                            <asp:CheckBox ID="ckbCadAtivo" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Direitos:
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadUsu" runat="server" />
                                            Cad.Usu&aacute;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadPar" runat="server" />
                                            Cad.Par&acirc;metro
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadLnk" runat="server" />
                                            Cad.Link
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCtt" runat="server" />
                                            Cad.Contato
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadEst" runat="server" />
                                            Cad.Estado
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCid" runat="server" />
                                            Cad.Cidade
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadBai" runat="server" />
                                            Cad.Bairro
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCli" runat="server" />
                                            Cad.Cliente
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCar" runat="server" />
                                            Cad.Caracteristica
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCom" runat="server" />
                                            Cad.Area Comum
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadTip" runat="server" />
                                            Cad.Tipo
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadCat" runat="server" />
                                            Cad.Categoria
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadImo" runat="server" />
                                            Cad.Im&oacute;vel
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbCadFot" runat="server" />
                                            Cad.Foto
                                        </td>
                                    </tr>

                                    <tr>
                                        <td style="vertical-align:top;">
                                            Data Cadastro:
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltDataCadastro" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align:top;">
                                            Cadastrado por:
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltCadastradoPor" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align:top;">
                                            Data Edição:
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltDataEdicao" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align:top;">
                                            Editado por:
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltEditadoPor" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">
                                            <span style="color:Red;"> (*) Campos Obrigatórios </span><br />
                                            <br />
                                            <br />
                                            <asp:Button ID="btnSalvar" runat="server" Enabled="False" ValidationGroup="Salvar"
                                                OnClick="btnSalvar_Click" Text="Salvar"  UseSubmitBehavior="false"/>
                                            &nbsp;<asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" 
                                                Text="Cancelar"  UseSubmitBehavior="false"/>
                                            <asp:Button ID="btnEditar" runat="server" Enabled="False" 
                                                OnClick="btnEditar_Click" Text="Editar"  UseSubmitBehavior="false"/>
                                            &nbsp;<asp:Button ID="btnExcluir" runat="server" Enabled="False" 
                                                OnClick="btnExcluir_Click" Text="Excluir"  UseSubmitBehavior="false"/>
                                            &nbsp;<asp:Button ID="btnNovo" runat="server" OnClick="btnNovo_Click" Text="Novo"  UseSubmitBehavior="false"/>
                                            <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnExcluir" ConfirmText="Confirma a exclusão do usuário?">
                                            </asp:ConfirmButtonExtender>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>

                </div>
            </div>
        </div>
    </div>

</asp:Content>




